package com.learn.lombok.with;

import lombok.AccessLevel;
import lombok.With;

public class WithEntity {
    // 每次 with 调用都是一个新对象
    @With(
        // with方法访问修饰符
        value = AccessLevel.PUBLIC
        // 方法上添加 指定注解
        , onMethod_ = {@Deprecated}
        // 方法参数上添加指定注解
        , onParam_ = {@Deprecated}
    )
    private String id;
    @With
    private String name;

    public WithEntity(String id, String name) {
        this.id = id;
        this.name = name;
    }
}
